package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Details;
import cn.wolfcode.crm.domain.Directory;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DetailsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Details record);

    Details selectByPrimaryKey(Long id);

    List<Details> selectAll();

    int updateByPrimaryKey(Details record);
    int query4Count(QueryObject qo);

    List<Details> query4List(QueryObject qo);

    List<Details> getDictionariesSnByDetails(String dictionariesSn);

    /**
     * 保存字典目录和字典明细的的关系
     * @param record 明细内容
     * @param
     */
    void insertByRecordAndSn(@Param("record") Details record, @Param("directory") Directory directory);
    /**
     * 修改字典目录和字典明细的的关系
     * @param record 明细内容
     * @param
     */
    void updateByRecordAndSn(@Param("record") Details record, @Param("directory") Directory directory);

    void deleteByDirectorySn(String sn);

    List<Details> getPlanDetails(String sn);
}